<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<style>
    .editTable .label {
        min-width: 80px;
        width: 80px;
    }
</style>
<table class="editTable">
    <div class="topjui-row">
        <div class="topjui-col-sm12" style="margin-top: 10px;">
            <label class="topjui-form-label">帐号</label>
            <div class="topjui-input-block">
                <input type="text" id="userAccount" name="userAccount" th:value="${userAccount}"></td>
            </div>
        </div>
    </div>

    <div class="topjui-row">
        <div class="topjui-col-sm12" style="margin-top: 10px;">
            <label class="topjui-form-label">原密码</label>
            <div class="topjui-input-block">
                <input type="text" id="originalPassword" name="originalPassword"></td>
            </div>
        </div>
    </div>
    <div class="topjui-row">
        <div class="topjui-col-sm12">
            <label class="topjui-form-label">新密码</label>
            <div class="topjui-input-block">
                <input type="text" id="password" name="password">
            </div>
        </div>
    </div>
    <div class="topjui-row">
        <div class="topjui-col-sm12">
            <label class="topjui-form-label">重复新密码</label>
            <div class="topjui-input-block">
                <input type="text" id="password2" name="password2">
            </div>
        </div>
    </div>
</table>

<script type="text/javascript">
    $(function () {
        $('#userAccount').iTextbox({
            width: 200,
            readonly: true
        });
        $('#originalPassword').iPasswordbox({
            width: 200,
            required: true,
        });
        $('#password').iPasswordbox({
            width: 200,
            required: true,
            validType: 'password'
        });
        $('#password2').iPasswordbox({
            width: 200,
            required: true,
            validType: "equals['#password']"
        });
    });

    //密码复杂程度验证
    /*$.extend($.fn.validatebox.defaults.rules, {
        password: {
            validator: function(value,param){
                var reg=/^(?![0-9a-z]+$)(?![0-9A-Z]+$)(?![0-9a-zA-Z]+$)(?!([^(0-9a-zA-Z)])+$)^.{6,16}$/;
                if (!reg.test(value)){
                    return false;
                }
                return  true;
            },
            message: '密码必须包含大小英文、数字、符号等不能小于6位'
        }
    });*/
</script>